package com.example.demo.mapper;

import com.example.demo.pojo.Menu;
import com.example.demo.pojo.MenuExample;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface MenuMapper {
    long countByExample(MenuExample example);

    int deleteByExample(MenuExample example);

    int deleteByPrimaryKey(Integer m_id);

    int insert(Menu record);

    int insertSelective(Menu record);

    List<Menu> selectByExample(MenuExample example);

    Menu selectByPrimaryKey(Integer m_id);

    int updateByExampleSelective(@Param("record") Menu record, @Param("example") MenuExample example);

    int updateByExample(@Param("record") Menu record, @Param("example") MenuExample example);

    int updateByPrimaryKeySelective(Menu record);

    int updateByPrimaryKey(Menu record);

    //只获取id和资源名
    @Select("select m_id,m_chineseName from menu order by m_id ")
    List<Menu> getIdAndCName();

    //查询资源名称
    @Select("select m_chineseName from menu where m_chineseName = #{m_chineseName} ")
    List<Menu> getCName(Menu menu);

}